perm filename UND.FAI[NEW,LSP] blob sn#389129 filedate 1979-09-25 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	a←←0
C00005 ENDMK
C⊗;
a←←0
b←←1
c←←2
d←←3
e←←4
p←←17

start:	move c, [=1000000]
	MOVE D,[252525252525]
	movei a, hand
	movem a, jobapr↑
	move b,int
	intenb b,
loop:	movei p,pdl-1
 	move b,s1
	fmp  b,s2
INTHER:	JRST [	PJOB E,
		MOVEM E,DMP
		MOVE E,[123456,,543210]
		MOVEM E,DMP+1
		MOVEM E,DMP+2
		MOVEM E,DMP+3
		MOVEM E,DMP+4
		MOVEM E,DMP+5
		INTDMP DMP
		 CAI
		JRST 4,.	]
	jumpe b,ok
	outstr [asciz /NON-ZERO RESULT = /]
	move d,b
	pushj p,decpnt
	OUTSTR [ASCIZ /
/]
ok:	sojg c,loop
	exit 1,

hand:	JRST 2,@[.+1]
	intmsk off
	MOVE A,JOBTPC↑
	MOVEM A,SAVTPC#
	MOVE A,JOBCNI↑
	MOVEM A,SAVCNI#
	HRRZ A,JOBTPC↑
	CAIE A,INTHER
	JRST 4,.
      	move a,jobtpc↑
	movem a, save
	MOVEI A,1
	MOVEM A,STATE#
	uwait
	CAME D,[252525252525]
	JRST [	OUTSTR [ASCIZ /ACS CLOBBERED AFTER UWAIT/]
		JRST 4,.	]
	AOS STATE
	debreak
	CAME D,[252525252525]
	JRST [	OUTSTR [ASCIZ /ACS CLOBBERED AFTER DEBREAK/]
		JRST 4,.	]
	AOS STATE
	setz b,
	move a,save
	AOS SAVE
	SETZM STATE
	tlne  a,100
	intdej int
	outstr	[asciz /UNUSUAL INTERRUPT, jobtpc = /]
	move d,save
	pushj p,octpnt
	OUTSTR [ASCIZ /
/]
	intdej int

decpnt:	idivi d,=10
	jumpe d,decpn1
	hrlm e,(p)
	pushj p,decpnt
	hlrz e,(p)
decpn1:	addi e,"0"
	outchr e
	popj p,

octpnt:	idivi d,10
	jumpe d,octpn1
	hrlm e,(p)
	pushj p,octpnt
	hlrz e,(p)
octpn1:	addi e,"0"
	outchr e
	popj p,

s1:	1.0E-30
s2:	1.0E-30
int:	100
save:	0
off:	777777,,777677
DMP:	BLOCK 6
PATCH:	BLOCK 100
pdl:	block 100
	end start